check if number is palindrome javascript